package com.qk.exe2;

public class Test {

	public static void main(String[] args) {
		MyObjectFactory mof = new MyObjectFactory();
		Dog dog = (Dog)mof.getObject("com.qk.exe2.Dog");
		Person person = (Person)mof.getObject("com.qk.exe2.Person");
		Book book = (Book)mof.getObject("com.qk.exe2.Book");
		System.out.println(dog.toString());
		System.out.println(person.toString());
		System.out.println(book.toString());
	}

}
